﻿using LJ.Socket.Data;
using Microsoft.AspNetCore.SignalR;

namespace LJ.Socket.Server.StraightChicken.SignalR;

public class StraightChickenHub(ISocketMessageListener socketMessageListener) : Hub
{
    private readonly ISocketMessageListener _socketMessageListener = socketMessageListener;

    public async Task DoWork(SocketMessage socketMessage)
    {
        await _socketMessageListener.OnReceiveAsync(socketMessage, Context.ConnectionAborted);
        //供客户端调用
    }
}
